<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>修改表单属性</title>
	</head>
	<body>
		<button>按钮</button>
		<input type="text" value="输入内容">
		<script type="text/javascript">
			var btn = document.querySelector('button');
			var input = document.querySelector('input');
			btn.onclick = function() {
				input.value = '被点击了';
				// btn.disabled = true;
				// this指向事件函数的调用者
				this.disabled = true;
			}
		</script>
	</body>
</html>
